
#ifndef _MODEL
#define _MODEL

#include "domain.h"
#include "constrain.h"
#include "../hed/hedmodel.h"
#include <list>
#include <vector>
#include <map>
using namespace std;
class Attribute;
class Mesh;


class Model
{
public:
  Model();
  void update( HEDModel _model );
  void viewBoundaryMesh();
  void viewDomainMesh();
  void viewBoundaryAttributes();
  void viewDomainAttributes();
  void viewModelAttributes();
  void getNumSubdivOfSelectedBoundary( int& _n1, int& _n2 );
  void setNumSubdivOfSelectedBoundary( int _n1, int _n2 );
  void generateMeshOfSelectedDomain(int _type , int step);
  bool applyAttributeOnSelectedBoundary( Attribute* _attrib );
  bool applyAttributeOnSelectedDomain( Attribute* _attrib );
  bool applyAttributeOnSelectedVertex( Attribute* _attrib );
  void scaleAttributeSymbol( double _scale );
  void generateMesh();
  Mesh* getMesh() { return m_mesh; };
  void cleanMesh() { delete m_mesh; m_mesh = NULL; };
  list<Constrain*> getConstrains() { return m_constrains; };
protected:
private:
  list<Domain*> m_domains;
  list<Constrain*> m_constrains;
  Mesh* m_mesh;
  double m_scaleAttribSymbol;
};


#endif
